#include <bits/stdc++.h>
#define rg register
#define pc putchar
#define gc getchar
#define pf printf
#define space pc(' ')
#define enter pc('\n')
#define me(x,y) memset(x,y,sizeof(x))
#define pb push_back
#define FOR(i,k,n,p) for(rg int i(k) ; i <= n ; i += p)
#define ROF(i,k,n,p) for(rg int i(k) ; i >= n ; i -= p)
using namespace std;
const int N = 10 ;
int n,k,top ;
int vis[N],ans[N],t[N],st[N] ;
struct E{int x,y ;}b[N] ;
vector<E>e[N] ;
inline double Time()
{
	return (double)clock()/CLOCKS_PER_SEC;
}
inline void read(int &x)
{
	x = 0 ;rg int f(0) ; rg char c(gc()) ;
	while(!isdigit(c)) f |= (c=='-'),c = gc() ;
	while(isdigit(c)) x = (x<<1)+(x<<3)+(c^48),c = gc() ;
	x = (f?-x:x) ;
}
int stk[30],tp ;
inline void print(int x){
	if(x < 0) pc('-'),x = -x ;
	do stk[++tp] = x%10,x /= 10 ; while(x) ;
	while(tp) pc(stk[tp--]^48) ;
}
void So(int x)
{
	st[++top] = x,t[x] = 1 ;
	for(auto v:e[x])
	{
		if(vis[v.y] || t[v.x]) continue ;
		So(v.x) ;
	}
}
inline int P()
{
	int f = 1 ;
	sort(st+1,st+1+top) ;
	FOR(i,1,top-1,1) if(st[i]+1 != st[i+1])
		f = 0 ;
	return f ;
}
inline void check()
{
	me(t,0) ; int ti = 0 ;
	FOR(i,1,n,1) if(!t[i])
		top = 0,So(i),ti += P() ;
	ans[ti]++ ;
}
void Dfs(int x)
{
	if(x == n) {check() ; return ;}
	vis[x] = 1,Dfs(x+1),vis[x] = 0,Dfs(x+1) ;
}
int main()
{
    freopen("soft.in","r",stdin) ;
    freopen("soft.out","w",stdout) ;
 	read(n),read(k) ;
 	FOR(i,1,n-1,1)
 	{
 		int u,v ; read(u),read(v) ;
 		b[i] = {u,v},e[u].pb({v,i}),e[v].pb({u,i}) ;
	 }
	Dfs(1) ;
	FOR(i,1,k,1) print(ans[i]),enter ;
	return 0;
}


